package chap6.string;


public class CompareStrings {
		
		public static void main(String[] args) {
			
			String s1 = new String("ABCD");
			String s4 = new String("ABCD");
			String s2 = "ABCD";
			String s3 = s2;
			
			System.out.println(s1.equals(s2));     
			System.out.println(s1.equals(s4));     
			     
			System.out.println("Check 4"+s1==s4);  
			System.out.println("Check 1"+s1==s2);  
			System.out.println("Check 2"+s2==s3);  
			s1=s2;
			System.out.println("Check 3"+s1==s2);  
		}
	
	}